export const dataType = [{
    label: '角色',
    id: 0
}, {
    label: '账号',
    id: 1
}, {
    label: '设备',
    id: 2
}]

export const channelData = [{
    label: '渠道1',
    id: 1
}, {
    label: '渠道2',
    id: 2
}, {
    label: '渠道3',
    id: 3
}, {
    label: '渠道4',
    id: 4
}, {
    label: '渠道5',
    id: 5
}, {
    label: '渠道6',
    id: 6
}]

export const serverData = [{
    label: '服务器1',
    id: 1
}, {
    label: '服务器2',
    id: 2
}, {
    label: '服务器3',
    id: 3
}, {
    label: '服务器4',
    id: 4
}, {
    label: '服务器5',
    id: 5
}, {
    label: '服务器6',
    id: 6
}]

export function pickerOptions(startDate, endDate) { // 禁用日期
    return {
        pickerOptionsStart: {
            disabledDate: time => {
                if (endDate) {
                    return time.getTime() > new Date(endDate).getTime()
                }
            }
        },
        pickerOptionsEnd: {
            disabledDate: time => {
                if (startDate) {
                    return time.getTime() < new Date(startDate).getTime() - 86400000
                }
            }
        }
    }
}